# coding=utf-8

"""
encode()  解码
decode()  编码
"""

# ascii 码表   每一个国家都出了自己的编码系统
# gbk  gb32   2个字节代表一个中文
# 万国码 unicode    utf-8  utf-16

# new_gbk = '潼瑶'.encode('gbk')
# print(new_gbk)  # b'\xe4\xfc\xd1\xfe'  # 字节
# old_gbk = new_gbk.decode('gbk')
# print(old_gbk)
#
#
# new_gbk = '潼瑶'.encode('utf-8')
# print(new_gbk)  # b'\xe6\xbd\xbc\xe7\x91\xb6'  # 字节
# old_gbk = new_gbk.decode('utf-8')
# print(old_gbk)